﻿using System;
using Yoozoo.Mars.Got;

namespace NpcFramework
{
    public class NFConstValue
    {
        public static int RandomNpcMaxNum = 5;
        public static int MaxNpcNum = 5;
        public static int MaxCarNum = 8;
        public static int DisableShadowDistance = 25;
        public static int MAX_TRAFFIC_WAIT_COUNT = 4;
        public static int MAXShadowLOD = 1;

        public static Action onQualityChange;
        
        
        //
        // public NFConstValue()
        // {
        //     DeviceQuality.Instance.RegisterAction(OnQualityChange);
        //     OnQualityChange(DeviceQuality.Instance.GetCurrentQuality());
        // }
        //
        // ~NFConstValue()
        // {
        //     DeviceQuality.Instance.UnRegisterAction(OnQualityChange);
        // }
        // //暂时写死，后期改成配表
        // private void OnQualityChange(QualityEnum qualityEnum)
        // {
        //     switch (qualityEnum)
        //     {
        //         case QualityEnum.Low:
        //             RandomNpcMaxNum = 3;
        //             MaxNpcNum = 2;
        //             MaxCarNum = 5;
        //             FarClipDistance = 1000;
        //             CameraFov = 55;
        //             MAXShadowLOD = 0;
        //             EnablePostEffect = true;
        //             break;
        //         case QualityEnum.Middle:
        //             RandomNpcMaxNum = 5;
        //             MaxNpcNum = 5;
        //             MaxCarNum = 8;
        //             FarClipDistance = 1000;
        //             CameraFov = 55;
        //             MAXShadowLOD = 0;
        //             EnablePostEffect = true;
        //             break;
        //         case QualityEnum.High:
        //             RandomNpcMaxNum = 6;
        //             MaxNpcNum = 10;
        //             MaxCarNum = 12;
        //             FarClipDistance = 1000;
        //             CameraFov = 60;
        //             MAXShadowLOD = 1;
        //             EnablePostEffect = true;
        //             break;
        //         case QualityEnum.Perfect:
        //             RandomNpcMaxNum = 6;
        //             MaxNpcNum = 10;
        //             MaxCarNum = 20;
        //             FarClipDistance = 1000;
        //             CameraFov = 60;
        //             MAXShadowLOD = 1;
        //             EnablePostEffect = true;
        //             break;
        //         default:
        //             break;
        //     }
        //     onQualityChange?.Invoke();
        // }
    }
}
